<?php
namespace app\index\model;

use think\Model;

class User extends Model
{

    protected function getBirthdayAttr($birthday)
    {
        return data('Y-m-d', $birthday);
    }

    protected function getUserBirthdayAttr($value, $data)
    {
        return date('Y-m-d', $data['birthday']);
    }
}